package com.example.innospace.demos.web.service.Impl;

import com.example.innospace.demos.pojo.Request.ProjectGeneralSetting;
import com.example.innospace.demos.web.mapper.ProjectGeneralSettingMapper;
import com.example.innospace.demos.web.service.ProjectGeneralSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ProjectGeneralSettingServiceImpl implements ProjectGeneralSettingService {



    @Autowired
    private ProjectGeneralSettingMapper projectGeneralSettingMapper;


    @Override
    public List<ProjectGeneralSetting> getGeneralSetting() {
        List<ProjectGeneralSetting> settings=new ArrayList<>();
        settings=projectGeneralSettingMapper.getAllSettings();
        return settings;
    }

    @Override
    public void saveGeneralSetting(ProjectGeneralSetting setting) {
        projectGeneralSettingMapper.save(setting);
    }

    @Override
    public void updateGeneralSetting(ProjectGeneralSetting setting) {
        projectGeneralSettingMapper.update(setting);
    }
}